package com.fancy.learncenter.bean;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

import java.io.Serializable;
import java.util.List;

/**
 * Created by hyy on 2018/4/4.
 */

public class VitaDetailDataBean implements Parcelable {


    /**
     * id : 7
     * user_id : 28
     * real_name : 虎uu
     * birthday : 1999-09-09
     * education : 本科
     * work_year : 5-7年
     * mobile : 18792112171
     * salary :
     * position :
     * location_id : 0
     * advantage :
     * add_time : 2018-04-04 00:18:45
     * age : 18
     * location : null
     * work_list : [{"id":"6","resume_id":"7","company_name":"点击黑胡椒选择","postion":"与i","start_time":"2018-04-14 00:00:00","end_time":"2018-04-14 00:00:00","add_time":"2018-04-14 19:05:41","time_interval":"2018-04 ~ 至今"}]
     * edu_list : [{"id":"7","resume_id":"7","school_name":"急急急","profession":"坎坎坷坷","start_time":"2018-04-13 00:00:00","end_time":"2018-04-13 00:00:00","diploma":"2","is_formal":"0","add_time":"2018-04-13 10:24:40","time_interval":"2018-04 ~ 至今"},{"id":"6","resume_id":"7","school_name":"坎坎坷坷","profession":"急急急","start_time":"2018-01-03 00:00:00","end_time":"2018-03-03 00:00:00","diploma":"2","is_formal":"0","add_time":"2018-04-13 10:24:00","time_interval":"2018-01 ~ 2018-03"}]
     * imgsrc : http://yigoutong.shweijue.com/upload/user/201804/15227801862773.jpeg
     * sex : 0
     */

    private String id;
    private String user_id;
    private String real_name;
    private String birthday;
    private String education;
    private String work_year;
    private String mobile;
    private String salary;
    private String position;
    private String location_id;
    private String advantage;
    private String add_time;
    private int age;
    private LocationBean location;
    private String imgsrc;
    private String sex;
    private List<WorkListBean> work_list;
    private List<EduListBean> edu_list;

    protected VitaDetailDataBean(Parcel in) {
        id = in.readString();
        user_id = in.readString();
        real_name = in.readString();
        birthday = in.readString();
        education = in.readString();
        work_year = in.readString();
        mobile = in.readString();
        salary = in.readString();
        position = in.readString();
        location_id = in.readString();
        advantage = in.readString();
        add_time = in.readString();
        age = in.readInt();
        imgsrc = in.readString();
        sex = in.readString();
        work_list = in.createTypedArrayList(WorkListBean.CREATOR);
        edu_list = in.createTypedArrayList(EduListBean.CREATOR);
    }

    public static final Creator<VitaDetailDataBean> CREATOR = new Creator<VitaDetailDataBean>() {
        @Override
        public VitaDetailDataBean createFromParcel(Parcel in) {
            return new VitaDetailDataBean(in);
        }

        @Override
        public VitaDetailDataBean[] newArray(int size) {
            return new VitaDetailDataBean[size];
        }
    };

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUser_id() {
        return user_id;
    }

    public void setUser_id(String user_id) {
        this.user_id = user_id;
    }

    public String getReal_name() {
        return real_name;
    }

    public void setReal_name(String real_name) {
        this.real_name = real_name;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public String getEducation() {
        return education;
    }

    public void setEducation(String education) {
        this.education = education;
    }

    public String getWork_year() {
        return work_year;
    }

    public void setWork_year(String work_year) {
        this.work_year = work_year;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getSalary() {
        return salary;
    }

    public void setSalary(String salary) {
        this.salary = salary;
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public String getLocation_id() {
        return location_id;
    }

    public void setLocation_id(String location_id) {
        this.location_id = location_id;
    }

    public String getAdvantage() {
        return advantage;
    }

    public void setAdvantage(String advantage) {
        this.advantage = advantage;
    }

    public String getAdd_time() {
        return add_time;
    }

    public void setAdd_time(String add_time) {
        this.add_time = add_time;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public LocationBean getLocation() {
        return location;
    }

    public void setLocation(LocationBean location) {
        this.location = location;
    }

    public String getImgsrc() {
        return imgsrc;
    }

    public void setImgsrc(String imgsrc) {
        this.imgsrc = imgsrc;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public List<WorkListBean> getWork_list() {
        return work_list;
    }

    public void setWork_list(List<WorkListBean> work_list) {
        this.work_list = work_list;
    }

    public List<EduListBean> getEdu_list() {
        return edu_list;
    }

    public void setEdu_list(List<EduListBean> edu_list) {
        this.edu_list = edu_list;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(id);
        dest.writeString(user_id);
        dest.writeString(real_name);
        dest.writeString(birthday);
        dest.writeString(education);
        dest.writeString(work_year);
        dest.writeString(mobile);
        dest.writeString(salary);
        dest.writeString(position);
        dest.writeString(location_id);
        dest.writeString(advantage);
        dest.writeString(add_time);
        dest.writeInt(age);
        dest.writeString(imgsrc);
        dest.writeString(sex);
        dest.writeTypedList(work_list);
        dest.writeTypedList(edu_list);
    }

    public static class WorkListBean implements Parcelable {
        /**
         * id : 6
         * resume_id : 7
         * company_name : 点击黑胡椒选择
         * postion : 与i
         * start_time : 2018-04-14 00:00:00
         * end_time : 2018-04-14 00:00:00
         * add_time : 2018-04-14 19:05:41
         * time_interval : 2018-04 ~ 至今
         */

        private String id;
        private String resume_id;
        private String company_name;
        private String postion;
        private String start_time;
        private String end_time;
        private String add_time;
        private String time_interval;

        protected WorkListBean(Parcel in) {
            id = in.readString();
            resume_id = in.readString();
            company_name = in.readString();
            postion = in.readString();
            start_time = in.readString();
            end_time = in.readString();
            add_time = in.readString();
            time_interval = in.readString();
        }

        public static final Creator<WorkListBean> CREATOR = new Creator<WorkListBean>() {
            @Override
            public WorkListBean createFromParcel(Parcel in) {
                return new WorkListBean(in);
            }

            @Override
            public WorkListBean[] newArray(int size) {
                return new WorkListBean[size];
            }
        };

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getResume_id() {
            return resume_id;
        }

        public void setResume_id(String resume_id) {
            this.resume_id = resume_id;
        }

        public String getCompany_name() {
            return company_name;
        }

        public void setCompany_name(String company_name) {
            this.company_name = company_name;
        }

        public String getPostion() {
            return postion;
        }

        public void setPostion(String postion) {
            this.postion = postion;
        }

        public String getStart_time() {
            return start_time;
        }

        public void setStart_time(String start_time) {
            this.start_time = start_time;
        }

        public String getEnd_time() {
            return end_time;
        }

        public void setEnd_time(String end_time) {
            this.end_time = end_time;
        }

        public String getAdd_time() {
            return add_time;
        }

        public void setAdd_time(String add_time) {
            this.add_time = add_time;
        }

        public String getTime_interval() {
            return time_interval;
        }

        public void setTime_interval(String time_interval) {
            this.time_interval = time_interval;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(id);
            dest.writeString(resume_id);
            dest.writeString(company_name);
            dest.writeString(postion);
            dest.writeString(start_time);
            dest.writeString(end_time);
            dest.writeString(add_time);
            dest.writeString(time_interval);
        }
    }

    public static class EduListBean implements Parcelable {
        /**
         * id : 7
         * resume_id : 7
         * school_name : 急急急
         * profession : 坎坎坷坷
         * start_time : 2018-04-13 00:00:00
         * end_time : 2018-04-13 00:00:00
         * diploma : 2
         * is_formal : 0
         * add_time : 2018-04-13 10:24:40
         * time_interval : 2018-04 ~ 至今
         */

        private String id;
        private String resume_id;
        private String school_name;
        private String profession;
        private String start_time;
        private String end_time;
        private String diploma;
        private String is_formal;
        private String diploma_txt;

        public String getDiploma_txt() {
            return diploma_txt;
        }

        public void setDiploma_txt(String diploma_txt) {
            this.diploma_txt = diploma_txt;
        }

        private String add_time;
        private String time_interval;

        protected EduListBean(Parcel in) {
            id = in.readString();
            resume_id = in.readString();
            school_name = in.readString();
            profession = in.readString();
            start_time = in.readString();
            end_time = in.readString();
            diploma = in.readString();
            is_formal = in.readString();
            add_time = in.readString();
            time_interval = in.readString();
        }

        public static final Creator<EduListBean> CREATOR = new Creator<EduListBean>() {
            @Override
            public EduListBean createFromParcel(Parcel in) {
                return new EduListBean(in);
            }

            @Override
            public EduListBean[] newArray(int size) {
                return new EduListBean[size];
            }
        };

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getResume_id() {
            return resume_id;
        }

        public void setResume_id(String resume_id) {
            this.resume_id = resume_id;
        }

        public String getSchool_name() {
            return school_name;
        }

        public void setSchool_name(String school_name) {
            this.school_name = school_name;
        }

        public String getProfession() {
            return profession;
        }

        public void setProfession(String profession) {
            this.profession = profession;
        }

        public String getStart_time() {
            return start_time;
        }

        public void setStart_time(String start_time) {
            this.start_time = start_time;
        }

        public String getEnd_time() {
            return end_time;
        }

        public void setEnd_time(String end_time) {
            this.end_time = end_time;
        }

        public String getDiploma() {
            return diploma;
        }

        public void setDiploma(String diploma) {
            this.diploma = diploma;
        }

        public String getIs_formal() {
            return is_formal;
        }

        public void setIs_formal(String is_formal) {
            this.is_formal = is_formal;
        }

        public String getAdd_time() {
            return add_time;
        }

        public void setAdd_time(String add_time) {
            this.add_time = add_time;
        }

        public String getTime_interval() {
            return time_interval;
        }

        public void setTime_interval(String time_interval) {
            this.time_interval = time_interval;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(id);
            dest.writeString(resume_id);
            dest.writeString(school_name);
            dest.writeString(profession);
            dest.writeString(start_time);
            dest.writeString(end_time);
            dest.writeString(diploma);
            dest.writeString(is_formal);
            dest.writeString(add_time);
            dest.writeString(time_interval);
        }
    }

    public class LocationBean {
        /**
         * id : 130102
         * areaname : 长安区
         * is_province : null
         * parentid : 130100
         * shortname : 长安
         * lng : null
         * lat : null
         * level : 3
         * letter : c
         * pinyin : null
         */

        @SerializedName("id")
        private String idX;
        private String areaname;
        private Object is_province;
        private String parentid;
        private String shortname;
        private Object lng;
        private Object lat;
        private String level;
        private String letter;
        private Object pinyin;

        public String getIdX() {
            return idX;
        }

        public void setIdX(String idX) {
            this.idX = idX;
        }

        public String getAreaname() {
            return areaname;
        }

        public void setAreaname(String areaname) {
            this.areaname = areaname;
        }

        public Object getIs_province() {
            return is_province;
        }

        public void setIs_province(Object is_province) {
            this.is_province = is_province;
        }

        public String getParentid() {
            return parentid;
        }

        public void setParentid(String parentid) {
            this.parentid = parentid;
        }

        public String getShortname() {
            return shortname;
        }

        public void setShortname(String shortname) {
            this.shortname = shortname;
        }

        public Object getLng() {
            return lng;
        }

        public void setLng(Object lng) {
            this.lng = lng;
        }

        public Object getLat() {
            return lat;
        }

        public void setLat(Object lat) {
            this.lat = lat;
        }

        public String getLevel() {
            return level;
        }

        public void setLevel(String level) {
            this.level = level;
        }

        public String getLetter() {
            return letter;
        }

        public void setLetter(String letter) {
            this.letter = letter;
        }

        public Object getPinyin() {
            return pinyin;
        }

        public void setPinyin(Object pinyin) {
            this.pinyin = pinyin;
        }
    }
}
